package com.mx.test;

import java.util.Arrays;
import java.util.TreeSet;

import org.junit.Test;

/**
 * @author mx
 * 计数
 *
 */
public class test2 {
	
	@Test
	public  void count(){
		String str="one little two little three little boys three";
		String[] str2=str.split(" ");
		TreeSet<String>  set  =  new   TreeSet<String>();   
		for (int i = 0; i < str2.length; i++) {
			set.add(str2[i]);
		}
		System.out.println(set.size());
		System.out.println(Arrays.toString(set.toArray()));
	}
}
